package com.github.prontera.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.github.prontera.ApiVersion;
import com.github.prontera.domain.ClientInvitation;
import com.github.prontera.model.response.ObjectDataResponse;
import com.github.prontera.service.ClientInvitationService;
import com.github.prontera.util.Page;

import io.swagger.annotations.ApiOperation;

/**
 * 技能标签
 * @author Alex
 */
@RestController
@RequestMapping(value = ApiVersion.MANAGE_V1_PREFIX + "/invitation", produces = { MediaType.APPLICATION_JSON_UTF8_VALUE }, consumes = { MediaType.APPLICATION_JSON_UTF8_VALUE })
public class ClientInvitationController {

	@Autowired
	private ClientInvitationService clientInvitationService;

	@ApiOperation(value = "查询邀请有礼列表", notes = "邀请有礼列表")
	@RequestMapping(value = "findInvitationList", method = RequestMethod.POST)
	@ResponseBody
	public ObjectDataResponse<Page<ClientInvitation>> findInvitationList(@RequestBody ClientInvitation clientInvitation) {
		Page<ClientInvitation>  page = clientInvitationService.pageList(clientInvitation);
		return new ObjectDataResponse<Page<ClientInvitation>>(page);
	}


}
